import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class HJ30 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = "";
        while((str = br.readLine()) != null) {
            String[] arr = str.split(" ");
            String s = arr[0] + arr[1];
            String str1 = "";
            String str2 = "";
            for(int i = 0; i < s.length(); i++) {
                if(i%2 == 0){//下标为偶数
                    str1 += s.charAt(i);
                }else {//下标为奇数
                    str2 += s.charAt(i);
                }
            }
            //排序
            char[] ch1 = str1.toCharArray();
            char[] ch2 = str2.toCharArray();
            Arrays.sort(ch1);
            Arrays.sort(ch2);

            //合并
            char[] chNew = new char[ch1.length + ch2.length];
            for(int i = 0; i < chNew.length; i++){
                if(i%2 == 0){
                    chNew[i] = ch1[i/2];
                }else{
                    chNew[i] = ch2[i/2];
                }
            }

            char[] password = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','A','B','C','D','E','F'};
            char[] dictionary = {'0','8','4','C','2','A','6','E','1','9','5','D','3','B','7','F','5','D','3','B','7','F'};
            for (int i = 0; i < chNew.length; i++){
                if((chNew[i]>= '0' && chNew[i] <= '9') ||
                        (chNew[i]>= 'a' && chNew[i] <= 'f') ||
                        (chNew[i]>= 'A' && chNew[i] <= 'F')){
                    chNew[i] = dictionary[String.valueOf(password).indexOf(chNew[i])];
                }
            }
            System.out.println(chNew);
        }
        br.close();
    }
}
